#include <stdio.h>
#include <stdbool.h>
#include <ctype.h>
#define SIZE 100
bool is_palindrome(char *, int n);
int main(void)
{
    char msg[SIZE];
    printf("Enter a message: ");
    char ch;
    char *p;
    for (p = msg; p < msg + SIZE && (ch = getchar()) != '\n';) {
        ch = tolower(ch);
        if (ch >= 'a' && ch <= 'z')
            *p++ = ch;
    }
    if (is_palindrome(msg, p - msg))
        printf("Palindrome\n");
    else
        printf("Not a palindrome\n");
    return 0;
}
bool is_palindrome(char *msg, int n) {
    for (char *p = msg, *q = msg + n - 1; p < q; p++, q--) 
        if (*p != *q)
            return false;
    return true;
}